import openpyxl
#获取工作簿
book = openpyxl.load_workbook("./datas/ss.xlsx")
#读取工作表
sheet = book.active
#读取单个单元格
cell_a1= sheet["A1"]
cell_a3=sheet.cell(column=1,row=3)
#读取多个连续单元格
cells = sheet["A1":"C3"]
print(type(cells),cells)
#遍历元素将数据读取出来

values = []
for row in cells:
    data =[]
    for cell in row :
        data.append(cell.value)
    values.append(data)
print(values)
#读取单元格的值
a1=cell_a1.value
print(a1)

